home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1.1 / The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso / 6 / asm1_01.zip / ASM-XREF.DOC next >
Text File  |  1985-11-13  |  3KB  |  50 lines

  1.                  ASSEMBLE OPERANDS vs MASM OPERANDS
  2.  
  3. Below is a partial listing of the syntax difference between ASSEMBLE and
  4. Microsoft's Macro Assembler. Although I don't have any refference material
  5. for the Macro Assembler to make a complete cross refference these are the
  6. instructions I see most often in magazine listings. I hope it helps.
  7.  
  8. In each of the examples below "lable" is a lable for a memory location such
  9. as the start of a buffer or the data in a DB operand. Equate is a label for
  10. the EQU pseudo operand and represents either a 8 or 16 bit value. Val is
  11. any legal integer number.
  12.  
  13. ASSEMBLE             MASM                      description
  14. lable                lable:                All lables in ASSEMBLE are global.
  15.                                            Use of a colon makes no difference.
  16.  
  17.                      assume  ss:lable      Assume not supported.
  18.  
  19. ds  10,' '           db  10 dup (' ')      initialize 10 memory bytes to blanks.
  20.  
  21. mov cl,[si]          mov cl,byte ptr [si]  move byte at address pointed to by
  22.                                            SI into CL. ASSEMBLE determines
  23.                                            byte operation from cl register.
  24.  
  25. movb lable,23        mov lable,23          Word or byte expressed in opcode
  26. cmpw lable,equate    cmp lable,equate      when operand is a memory pointer
  27. movw [si],23         mov word ptr [si],23  and source is immediate data.
  28.  
  29. cmpb [lable+val],23  cmp lable[val],23     Addressing byte at lable plus an
  30.                                            offsetting value.
  31.  
  32. mov al,lable+1[bx]   mov al,lable[bx+1]    Addressing byte at lable+1+BX.
  33.                                            Registers in brackets must be in
  34.                                            exact format given in ASSEMBLE
  35.                                            documentation.
  36.  
  37. repne                repne scasb           Repeat pre opcodes must be on a
  38. scasb                                      seperate line.
  39.  
  40. es                                         Segment over rides must be on a
  41. mov ah,[bx]          mov ah,es:[bx]        seperate line
  42.  
  43. shr AH               shr AH,1              When the shift is one bit the shift
  44. shl AH,CL            shl AH,CL             value is understood. Shifts of more
  45.                                            than one require the use of the CL
  46.                                            register.
  47.  
  48. jmps lable           jmp short lable       See discussion of jumps in DOC.
  49.  
  50. jmpf lable           jmp far label         "       "            "       "